<?php


namespace common\models\hospital;

use Yii;

/**
 * This is the model class for table "by_registration_list_hfx".
 *
 * @property int $id
 * @property int $document_id 单据号
 * @property string $card_id 磁卡号码
 * @property string|null $truename 姓名
 * @property string|null $sex 性别
 * @property string|null $birthday 生日
 * @property string|null $registration_time 挂号时间
 * @property int|null $section 科室
 * @property string|null $doctor_name 医生姓名
 * @property string|null $disease_type 挂号病种
 * @property string|null $registration_type 挂号方式
 * @property string|null $message_source 信息来源
 * @property string|null $mobile 电话号码
 * @property string|null $address 地址
 * @property string|null $phone 联系手机
 * @property string|null $salesman 业务员
 * @property string|null $operator 操作员
 * @property float|null $Insurance_pay 保险支付
 * @property float|null $person_pay 个人支付
 * @property float|null $registration_fee 挂号费
 * @property float|null $treatment 治疗费
 * @property float|null $other_fee 其他费
 * @property string|null $Summary_time 汇总时间
 * @property int|null $created_time 创建时间
 * @property int|null $updated_time 更新时间
 * @property int|null $serial_no  奕远自增id
 * @property int|null $state  200= 正常  300 = 退号
 * @property string|null $city 城市字符串
 */
class RegistrationList  extends \yii\db\ActiveRecord
{
    public static $pix = '';

    public static function tableName()
    {
        return '{{%registration_list_'.self::$pix.'}}';
    }

    public static function getDb()
    {
        return Yii::$app->db3;
    }

//    public function rules()
//    {
//        return [
//            [['document_id', 'card_id'], 'required'],
//            [['document_id', 'section', 'created_time'], 'integer'],
//            [['birthday', 'registration_time', 'Summary_time'], 'safe'],
//            [['Insurance_pay', 'person_pay', 'registration_fee', 'treatment', 'other_fee'], 'number'],
//            [['truename','card_id', 'doctor_name', 'disease_type', 'registration_type', 'message_source', 'salesman', 'operator'], 'string', 'max' => 50],
//            [['sex'], 'string', 'max' => 10],
//            [['mobile', 'phone'], 'string', 'max' => 11],
//            [['address'], 'string', 'max' => 255],
//        ];
//    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'document_id' => 'Document ID',
            'card_id' => 'Card ID',
            'truename' => 'Truename',
            'sex' => 'Sex',
            'birthday' => 'Birthday',
            'registration_time' => 'Registration Time',
            'section' => 'Section',
            'doctor_name' => 'Doctor Name',
            'disease_type' => 'Disease Type',
            'registration_type' => 'Registration Type',
            'message_source' => 'Message Source',
            'mobile' => 'Mobile',
            'address' => 'Address',
            'phone' => 'Phone',
            'salesman' => 'Salesman',
            'operator' => 'Operator',
            'Insurance_pay' => 'Insurance Pay',
            'person_pay' => 'Person Pay',
            'registration_fee' => 'Registration Fee',
            'treatment' => 'Treatment',
            'other_fee' => 'Other Fee',
            'Summary_time' => 'Summary Time',
            'created_time' => 'Created Time',
        ];
    }

}